package smb.interceptor;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import entity.User;
import smb.sevice.UserServiceI;

public class TestUserDao {

	public static void main(String[] args) {
		ApplicationContext ac = new ClassPathXmlApplicationContext("app*.xml");
		UserServiceI uservice = (UserServiceI) ac.getBean("userService");
		System.out.println(uservice.getClass().getName());
		User user = new User();
		user.setUsercode("cn09091");
		user.setUsername("王二麻子");
		user.setUserpassword("111111");
		uservice.reg(user);
		uservice.login("liming", "111122");
	}
}
